package com.jframe.sys.controller.utils;

import javax.servlet.http.HttpServletRequest;

import com.jframe.sys.utils.StringUtil;

public class PageInfo {

	public  String getPageIframeId(HttpServletRequest request){
		String iframeId = StringUtil.null2Space(request.getParameter("iframeId_"));
		return iframeId;
	}
	
	public  String getPageTabId(HttpServletRequest request){
		String tabId = StringUtil.null2Space(request.getParameter("tabId_"));
		return tabId;
	}
	
	public String getDataSrcId(HttpServletRequest request){
		String datasrcId = StringUtil.null2Space(request.getParameter("datasrcId_"));
		return datasrcId;
	}
	
	public  int getGridLimit(HttpServletRequest request){
		return  StringUtil.parseInt(StringUtil.null2Space(request.getParameter("rows")));
	}
	
	public  int getGridStart(HttpServletRequest request){
		int start = StringUtil.parseInt(StringUtil.null2Space(request.getParameter("page")));
		int limit = getGridLimit(request);
		start = limit*start-limit;
		return start;
	} 
	
	
}
